﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace Oroboros.Save_Data
{
    public class GeneratorSaveData:INotifyPropertyChanged
    {
        private Guid myGuid;

        private int _DailyFuelRequired;
        private string _DisplayName;
        private bool _Enabled;
        private int _Health;
        private int _MaxHealth;
        private int _MaxOutput;
        private int _Output;
        private bool _PoweredLights;

        public Guid Guid
        {
            get { return this.myGuid; }
            set { this.myGuid = value; }
        }

        public int DailyFuelRequired { get { return _DailyFuelRequired; } set { Changed("DailyFuelRequired"); _DailyFuelRequired = value; } }
        public string DisplayName { get { return _DisplayName; } set { Changed("DisplayName"); _DisplayName = value; } }
        public bool Enabled { get { return _Enabled; } set { Changed("Enabled"); _Enabled = value; } }
        public int Health { get { return _Health; } set { Changed("Health"); _Health = value; } }
        public int MaxHealth { get { return _MaxHealth; } set { Changed("MaxHealth"); _MaxHealth = value; } }
        public int MaxOutput { get { return _MaxOutput; } set { Changed("MaxOutput"); _MaxOutput = value; } }
        public int Output { get { return _Output; } set { Changed("Output"); _Output = value; } }
        public bool PoweredLights { get { return _PoweredLights; } set { Changed("PoweredLights"); _PoweredLights = value; } }

        public event PropertyChangedEventHandler PropertyChanged;
        public void Changed(string n)
        {
            if (PropertyChanged == null) return;
            if (!string.IsNullOrEmpty(n))
                PropertyChanged(this, new PropertyChangedEventArgs(n));
        }

        public override string ToString()
        {
            return string.Format("Generator {0}", DisplayName);
        }
    }
}
